<template>
	<div>
		<el-tabs type="border-card">
            <el-tab-pane label="基础资料">
                <baseInfoVue></baseInfoVue>
            </el-tab-pane>
            <el-tab-pane label="推荐设计方">
            	<el-table :data="tableData" style="width: 100%">
	                <el-table-column prop="date" label="企业名称">
	                </el-table-column>
					<el-table-column prop="date" label="添加时间">
	                </el-table-column>
	                <el-table-column prop="date" label="标签">
	                </el-table-column>
	                <el-table-column prop="date" label="描述">
	                </el-table-column>
	                <el-table-column label="操作">
			      		<template scope="scope">
		            		<el-button type="primary" size="small">标签</el-button>
		            		<el-button type="primary" size="small">描述</el-button>
		            		<el-button type="primary" size="small">移除</el-button>
	            		</template>
	                </el-table-column>
	            </el-table>
	            <div style="margin-top:20px;text-align:center">
	            	<el-button type="primary" @click="openDialog('addProductHotCompany')">添加</el-button>
	            </div>
            </el-tab-pane>
            <el-tab-pane label="推荐咨询方">
            	<el-table :data="tableData" style="width: 100%">
	                <el-table-column prop="date" label="企业名称">
	                </el-table-column>
					<el-table-column prop="date" label="添加时间">
	                </el-table-column>
	                <el-table-column prop="date" label="标签">
	                </el-table-column>
	                <el-table-column prop="date" label="描述">
	                </el-table-column>
	                <el-table-column label="操作">
			      		<template scope="scope">
		            		<el-button type="primary" size="small">标签</el-button>
		            		<el-button type="primary" size="small">描述</el-button>
		            		<el-button type="primary" size="small">移除</el-button>
	            		</template>
	                </el-table-column>
	            </el-table>
	            <div style="margin-top:20px;text-align:center">
	            	<el-button type="primary">添加</el-button>
	            </div>
            </el-tab-pane>
            <el-tab-pane label="推荐承建方">
            	<el-table :data="tableData" style="width: 100%">
	                <el-table-column prop="date" label="企业名称">
	                </el-table-column>
					<el-table-column prop="date" label="添加时间">
	                </el-table-column>
	                <el-table-column prop="date" label="标签">
	                </el-table-column>
	                <el-table-column prop="date" label="描述">
	                </el-table-column>
	                <el-table-column label="操作">
			      		<template scope="scope">
		            		<el-button type="primary" size="small">标签</el-button>
		            		<el-button type="primary" size="small">描述</el-button>
		            		<el-button type="primary" size="small">移除</el-button>
	            		</template>
	                </el-table-column>
	            </el-table>
	            <div style="margin-top:20px;text-align:center">
	            	<el-button type="primary">添加</el-button>
	            </div>
            </el-tab-pane>
            <el-tab-pane label="推荐资方">
            	<el-table :data="tableData" style="width: 100%">
	                <el-table-column prop="date" label="企业名称">
	                </el-table-column>
					<el-table-column prop="date" label="添加时间">
	                </el-table-column>
	                <el-table-column prop="date" label="标签">
	                </el-table-column>
	                <el-table-column prop="date" label="描述">
	                </el-table-column>
	                <el-table-column label="操作">
			      		<template scope="scope">
		            		<el-button type="primary" size="small">标签</el-button>
		            		<el-button type="primary" size="small">描述</el-button>
		            		<el-button type="primary" size="small">移除</el-button>
	            		</template>
	                </el-table-column>
	            </el-table>
	            <div style="margin-top:20px;text-align:center">
	            	<el-button type="primary">添加</el-button>
	            </div>
            </el-tab-pane>
            <el-tab-pane label="推荐设备供应方">
            	<el-table :data="tableData" style="width: 100%">
	                <el-table-column prop="date" label="企业名称">
	                </el-table-column>
					<el-table-column prop="date" label="添加时间">
	                </el-table-column>
	                <el-table-column prop="date" label="标签">
	                </el-table-column>
	                <el-table-column prop="date" label="描述">
	                </el-table-column>
	                <el-table-column label="操作">
			      		<template scope="scope">
		            		<el-button type="primary" size="small">标签</el-button>
		            		<el-button type="primary" size="small">描述</el-button>
		            		<el-button type="primary" size="small">移除</el-button>
	            		</template>
	                </el-table-column>
	            </el-table>
	            <div style="margin-top:20px;text-align:center">
	            	<el-button type="primary">添加</el-button>
	            </div>
            </el-tab-pane>
            <el-tab-pane label="推荐运维方">
            	<el-table :data="tableData" style="width: 100%">
	                <el-table-column prop="date" label="企业名称">
	                </el-table-column>
					<el-table-column prop="date" label="添加时间">
	                </el-table-column>
	                <el-table-column prop="date" label="标签">
	                </el-table-column>
	                <el-table-column prop="date" label="描述">
	                </el-table-column>
	                <el-table-column label="操作">
			      		<template scope="scope">
		            		<el-button type="primary" size="small">标签</el-button>
		            		<el-button type="primary" size="small">描述</el-button>
		            		<el-button type="primary" size="small">移除</el-button>
	            		</template>
	                </el-table-column>
	            </el-table>
	            <div style="margin-top:20px;text-align:center">
	            	<el-button type="primary">添加</el-button>
	            </div>
            </el-tab-pane>
        </el-tabs>

        <!-- 添加推荐企业 -->
		<el-dialog title="添加推荐企业" :visible.sync="dialog.addProductHotCompany.open" :modal="false" size="small" v-if="dialog.addProductHotCompany.open">
			<el-form>
				<el-form-item label="企业">
					<el-select
				    v-model="value10"
				    multiple
				    :multiple-limit="1"
				    filterable
				    allow-create
				    placeholder="请选择文章标签"
				    icon="edit"
				    >
				    <el-option
				      v-for="item in options5"
				      :key="item.value"
				      :label="item.label"
				      :value="item.value">
				    </el-option>
				    </el-select>
					<el-button @click="searchCompany">搜索</el-button>
				</el-form-item>

				<el-form-item label="标签">
					<el-select
				    v-model="value10"
				    multiple
				    :multiple-limit="6"
				    filterable
				    allow-create
				    placeholder="请选择文章标签"
				    icon="edit"
				    >
				    <el-option
				      v-for="item in options5"
				      :key="item.value"
				      :label="item.label"
				      :value="item.value">
				    </el-option>
				    </el-select>

				</el-form-item>

				<el-form-item label="描述">
					<el-input
					  type="textarea"
					  :autosize="{ minRows: 2, maxRows: 4}"
					  placeholder="请输入内容"
					  v-model="textarea3">
					</el-input>
				</el-form-item>
			</el-form>
		</el-dialog>
	</div>
</template>

<script>

import baseInfoVue from '@/components/product/common/add/base.vue'

export default{
	components:{baseInfoVue},
	data(){
		return{
			dialog:{
				addProductHotCompany:{
					open:false
				}
			},
			value10:[],
			textarea3:'',
			options5:[],
			state4: '',
			restaurants:[],
			timeout:  null,
			tableData:[{
                date: '2016-05-02',
                name: '王小虎',
                address: '上海市普陀区金沙江路 1518 弄'
            }, {
                date: '2016-05-04',
                name: '王小虎',
                address: '上海市普陀区金沙江路 1517 弄'
            }, {
                date: '2016-05-01',
                name: '王小虎',
                address: '上海市普陀区金沙江路 1519 弄'
            }, {
                date: '2016-05-03',
                name: '王小虎',
                address: '上海市普陀区金沙江路 1516 弄'
            }]
		}
	},
	methods:{
		openDialog(dialog){
			this.dialog[dialog].open = true
		},
		searchCompany(){
			console.log(this.value10)
			this.options5 = [{
		          value: 'HTML',
		          label: 'HTML'
		        }, {
		          value: 'CSS',
		          label: 'CSS'
		        }, {
		          value: 'JavaScript',
		          label: 'JavaScript'
		        }]
		    this.value10 = []
		}

	}
}
</script>
